<?php
require_once 'classes/photos.php';
require_once 'classes/albums.php';
require_once 'classes/mySession.php';

if(!$pgSession->isUserLoggedIn()){
	$retorno = json_encode(array("status"=>FALSE,"message"=>"No user logged in."));
}else{
	$ownerN = $pgSession->getUserId();
	$albumidN = $_GET[Album::$currentAlbumForms];
	$search = $photoUtils->findUserPhotos($ownerN, $albumidN, -1);
	$albums = $albumUtils->findUserAlbums($ownerN, -1);
	$search["albums"] = $albums["albums"];
	echo json_encode($search);
}
?>